package cn.wolfcode.service.impl;

import cn.wolfcode.domain.DeptLog;
import cn.wolfcode.mapper.DeptLogMapper;
import cn.wolfcode.mapper.DeptMapper;
import cn.wolfcode.service.DeptLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
@Transactional(propagation= Propagation.REQUIRES_NEW)
@Service
public class DeptLogServiceImpl implements DeptLogService {
    @Autowired
    private DeptLogMapper deptLogMapper;
    @Override
    public void add(DeptLog deptLog) {
        deptLog.setCreateTime(new Date());
        deptLogMapper.add(deptLog);
    }
}
